package com.gcit.seniorWish.web.common.persistence.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * 菜单表
 *
 * @author gaozhichang
 * @date 2018-03-13 下午 1:32
 */
@TableName("system_menu")
public class Menu extends Model<Menu> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.UUID)
	private String id;
	/**
	 * 父级id
	 */
	private String pid;
	/**
	 * 所有父级菜单id
	 */
	private String pids;
	/**
	 * 菜单名称
	 */
	private String name;
	/**
	 * url地址
	 */
	private String url;
	/**
	 * 菜单图标
	 */
	private String icon;
	/**
	 * 菜单排序号
	 */
	private Integer num;

	/**
	 * 是否是菜单（1：是  0：不是）
	 */
	private Integer isMenu;
	/**
	 * 是否打开:    1:打开   0:不打开
	 */
	private Integer isOpen;
	/**
	 * 是否启用 :  1:启用   0:不启用
	 */
	private Integer status;

	/**
	 * 菜单层级
	 */
	private Integer rank;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 创建时间
	 */
	@TableField(fill=FieldFill.INSERT)
	private Date createTime;

	/**
	 * 创建者id
	 */
	@TableField(fill= FieldFill.INSERT)
	private String createBy;

	/**
	 * 更新时间
	 */
	@TableField(fill=FieldFill.UPDATE)
	private Date modifyTime;

	/**
	 * 更新者id
	 */
	@TableField(fill= FieldFill.UPDATE)
	private String modifyBy;

	/**
	 * 删除标记
	 */
	@TableField(fill=FieldFill.INSERT)
	@TableLogic
	private Integer delFlag;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getPids() {
		return pids;
	}

	public void setPids(String pids) {
		this.pids = pids;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Integer getIsMenu() {
		return isMenu;
	}

	public void setIsMenu(Integer isMenu) {
		this.isMenu = isMenu;
	}

	public Integer getIsOpen() {
		return isOpen;
	}

	public void setIsOpen(Integer isOpen) {
		this.isOpen = isOpen;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getRank() {
		return rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getModifyBy() {
		return modifyBy;
	}

	public void setModifyBy(String modifyBy) {
		this.modifyBy = modifyBy;
	}

	public Integer getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(Integer delFlag) {
		this.delFlag = delFlag;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Menu{" +
				"id='" + id + '\'' +
				", pid='" + pid + '\'' +
				", pids='" + pids + '\'' +
				", name='" + name + '\'' +
				", url='" + url + '\'' +
				", icon='" + icon + '\'' +
				", num=" + num +
				", isMenu=" + isMenu +
				", isOpen=" + isOpen +
				", status=" + status +
				", rank=" + rank +
				", remark='" + remark + '\'' +
				", createTime=" + createTime +
				", createBy='" + createBy + '\'' +
				", modifyTime=" + modifyTime +
				", modifyBy=" + modifyBy +
				", delFlag=" + delFlag +
				'}';
	}
}
